# make/android.mk
# Android specific build tasks

# --- Android Variables ---
ANDROID_RELEASE_BUNDLE := $(BUILD_DIR)/app/outputs/bundle/release/app-release.aab
ANDROID_RELEASE_APK := $(BUILD_DIR)/app/outputs/flutter-apk/app-release.apk

# --- Android Targets ---
.PHONY: android-build-apk android-build-aab android-run android-clean

android-build-apk: android-clean get
	@echo "--> [ANDROID] Building release APK..."
	@flutter build apk --release
	@echo "✅ APK generated at: $(ANDROID_RELEASE_APK)"

android-build-aab: android-clean get
	@echo "--> [ANDROID] Building release App Bundle..."
	@flutter build appbundle --release
	@echo "✅ AAB generated at: $(ANDROID_RELEASE_BUNDLE)"

android-run:
	@echo "--> [ANDROID] Running app on Android device..."
	@flutter run -d android

android-clean:
	@echo "--> [ANDROID] Cleaning Android build artifacts..."
	@rm -rf $(BUILD_DIR)/app
	@echo "✅ Android build cleaned."